<table class="layui-table text-center" lay-size="sm">
    <thead>
        <tr>
            <th><input type="checkbox" class="checked-all" target="temp-id"></th>
            <th><div class="text-left">分类</div></th>
            <th>国家</th>
            <th><div class="text-left">主题</div></th>
            <th><div class="text-left">中文主题</div></th>
            <th><div class="text-left">关键词</div></th>
            <th>排序</th>
            <th>状态</th>
            <th>是否HTML</th>
            <th>创建时间</th>
            <th>备注</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        {volist name="list" id="item"}
            <tr>
                <td><input type="checkbox" class="temp-id" value="{$item.temp_id}"></td>
                <td><div class="text-left">{$item.category.name}</div></td>
                <td>{$item.country.name_ch}</td>
                <td><div class="text-left">{$item.subject}</div></td>
                <td><div class="text-left">{$item.subject_ch}</div></td>
                <td><div class="text-left">{$item.keyword}</div></td>
                <td>{$item.sort}</td>
                <td>
                    {php}$status = $item['status'] == '关闭' ? 0 : 1;{/php}
                    <a href="{:url('save',['temp_id'=>$item['temp_id'], 'status'=>abs(1-$status)])}" class="ajax-get" msg="0" style="font-size: 16px;">
                        {$status?'<i class="fa fa-unlock"></i>':'<i class="fa fa-lock text-red"></i>'}</a>
                </td>
                <td>
                    <span class="{$item.is_html?'text-yellow':'text-muted'}"><i class="fa fa-circle"></i> {$item.is_html?'是':'否'}</span>
                </td>
                <td>{$item.create_time}</td>
                <td class="text-left">{$item.remark}</td>
                <td>
                    <a item="{$item.temp_id}" class="layui-btn layui-btn-xs layui-bg-orange copy-email-template">生成</a>
                    <a href="{:url('add',['temp_id'=>$item['temp_id']])}" class="layui-btn layui-btn-xs layui-btn-normal">编辑</a>
                    <a href="{:url('delete',['ids'=>$item['temp_id']])}" title="删除" confirm="1" class="layui-btn layui-btn-xs layui-btn-danger ajax-get">删除</a>
                </td>
            </tr>
        {/volist}
        {empty name="list"}
        <tr>
            <td colspan="12">没有数据</td>
        </tr>
        {/empty}
    </tbody>
</table>
<div class="page">
    {$page|raw}
</div>